﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Web;
using TicketMaster.Object;

namespace TicketMaster.Web.Models
{
    public class SubmittedCommentViewModel
    {
        public string Content { get; set; }
        public int RouteId { get; set; }

        public bool IsPositive { get; set; }
        public double Rate { get; set; }
        public static Expression<Func<Comment, SubmittedCommentViewModel>> FromComment
        {
            get
            {
                return x => new SubmittedCommentViewModel
                {
                    Rate = x.Rate,
                    Content = x.Content,
                    RouteId = x.RouteId,
                    IsPositive = x.IsPositive

                };
            }
        }
    }
}